package algorithms;

import wheel.KeyWheel;

public class Beaufort {
    private static KeyWheel computerWheel = new KeyWheel(100,"ABCDEFGHIJKLMNOPQRSTUVWXYZ",0) ;
    
    public static Key getResultingLetterEncrypt(Key key,int beaufortShitKey){
	
	// first thing with Beaufort, we get the reciprocalKey.
	Key reciprocalKey = Key.charToKey(key.getReciprocalKey());

	// then we have to shit.
	return computerWheel.getKeys().get((computerWheel.getKeys().lastIndexOf(reciprocalKey)+beaufortShitKey)% 26);
    }
    
    
}
